The present invention relates to image processing and, more particularly, to an analog front end circuit which provides digital optical black and offset correction for CCD inputs and enables the use of the same channel for both CCD and video signal inputs.
Advances in integrated circuit design and manufacturing have enabled low cost, highly integrated, high performance image processing products, including the digital electronic cameras and camcorders. A conventional camera comprises an image sensor, typically an array charge coupled device (CCD), an analog front end (AFE) and a digital image processor. A CCD is a two-dimensional array of sensors each of which produces a charge as a function of the quantity of photons it absorbs. After an image is exposed on a CCD, the pixels are shifted vertically to a line charge register and this line shifts the pixels horizontally to the output. Most CCDs have an on-chip amplifier, usually a source follower, which converts the charge to a voltage output.
Most analog front end circuits having optical black and offset calibration include schemes that integrate the error signal on a capacitor during an optical black period and feed back the voltage generated to the input to cancel the offset or the optical black value during the image interval.
As is known, analog image signals output from image processing devices may be supplied to a feedback clamp circuit prior to being processed in various manners including, for example, linear mask processing, gamma correction, and knee correction, in order to produce a video signal. Our copending application, Ser. No. 09/353,919, as shown in FIG. 1, provides a CCD signal processing method that provides optical black offset correction using a moving average filter scheme such that the optical black pixels are averaged at the beginning of each line and offset DACs, 114 and 116, are updated in order to cancel the offset. Specifically, this embodiment provides a digital technique that corrects the offset and optical black value in the analog domain using a coarse and fine adjustment mode. Digital optical black correction circuit 100 determines the necessary amount that the analog image signal should be adjusted. DACs, 114 and 116, provide offsets in the coarse and fine adjustment modes, respectively. This highly programmable design 100 can be used both in discrete and continuous time systems and does not require any off-chip components.
The analog front end (AFE) 100 converts the CCD (not shown) output signal to digital data to allow subsequent digital signal processing. At the input of the AFE 100, the DC level of the CCD output signal is clamped to the input dynamic range. For better noise performance and dynamic range, correlated double sampling is applied to the clamped input signal. The output of correlated double sampler (CDS) 102 is amplified by a programmable gain amplifier 106 that varies exponentially with linear control. Then the amplified analog signal is converted to digital data. The optical black value and channel offset are corrected in order to maximize the dynamic range.
In operation, CCD image lines are shifted vertically to a line register, then the pixels on this line are shifted horizontally to an output pin. This embodiment cancels the optical black level experienced by the image signal. However, line noise may exist in the optical black correction. Even when correction DAC updates are averaged over a fixed number of user programmable lines, there may be visible bands on the image. Moreover, the average differs from line to line since some of the optical black pixels may be defective, i.e. hot and cold optical black pixels. A hot pixel is a defective pixel that generates too much charge, and a cold pixel is the one that does not generate any charge.
Our copending application Ser. No. 60/152,439, as shown in FIGS. 2 and 3, discloses a moving average filter scheme for CCD optical black correction that removes this line noise along with the hot and cold pixels without creating bands on the image. It has a straightforward moving average filter, including a simplified version, that can be used in order to save a significant amount of registers and complex digital circuits. Yet, this design is still lacking in that it only operates to receive image signals in the CCD mode.
There, however, exist a need for processing video input signals in many applications, along with the ability to process CCD signals; hence, there exists a need to operate in both a CCD mode and a video mode.
To address the above-discussed deficiencies of the moving average filter scheme for CCD optical black correction, the present invention teaches an analog front-end circuit that has two modes of operation: a first mode for CCD image signals and a second mode for video image signals. This analog front end circuit, including a sampling circuit and an analog-to-digital converter, is operable to sample, amplify, and convert the analog image signal to a digital image signal.
A sampling circuit samples the CCD input signal or the video input signal using a correlated double sampler (CDS), comprising a single-ended amplifier and a differential amplifier, coupled to a programmable gain amplifier (PGA). The single-ended amplifier functions such that it is only operable during an CCD signal input; otherwise, the single-ended amplifier is bypassed such that a video signal is only sampled by the differential amplifier. The single-ended amplifier samples the reference level of the pixel and holds it during the video interval. The differential amplifier samples both the output of the single ended amplifier and the video level of the same pixel. Overall, the CDS subtracts these levels and converts the difference to a differential output to improve signal to noise performance and dynamic range. An analog-to-digital converter converts the sampled signal and feeds this digital sample to a digital correction circuit which corrects the optical black level and removes hot and cold pixels and line noise.
Albeit, a digital error correction circuit connects to the analog front-end circuit to remove the optical black pixel level from the image signal such that the sum of the channel offset and optical black level is averaged for a given number of lines and optical black cells per line, and the channel is digitally calibrated to obtain a user programmed ADC output which corresponds to that average.
In a second embodiment, the error correction circuit removes hot and cold pixels, as well as filters line noise. Moreover, a digital filter is employed to obtain noise-free optical black correction with digitally programmable bandwidth.
Advantages of this design include but are not limited to an image processing apparatus operable in a CCD mode and video mode. This circuit has an improved dynamic range for image processing over other approaches. As such, this highly programmable design can be used both in discrete and continuous time systems and does not require any off-chip components. Thus, this design meets the goal of extracting as much analog dynamic range from the image sensor without adding any noise with subsequent circuitry.